package servlet.huwenyao;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
import pojo.Goods;
import service.OrderService;
import service.impl.OrderServiceImpl;
import util.JsonDateValueProcessor;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

/**
 * 查看商品中转Servlet
 */
@WebServlet(value = "/QueryWareServlet2")
public class QueryWareServlet2 extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //设置返回的格式
        response.setContentType("text/json;charset=UTF-8");
        //获取商品id
        String id= request.getParameter("wareId");
        if(null==id){
            //回到原页面
        }else{
            request.setAttribute("wareId",id);
            request.getRequestDispatcher("jsp/hwy/QueryWare.jsp").forward(request,response);
        }

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
     doPost(request,response);
    }
}
